<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo lang('system_author');?></title>
<link rel="stylesheet" type="text/css" href="<?php echo brd_url('css/admin_style.css')?>" />
<link rel="stylesheet" type="text/css" href="<?php echo brd_url('css/common.css')?>" />
<script type="text/javascript" src="<?php echo brd_url('js/jquery-1.8.1.js')?>"></script>
<script type="text/javascript" src="<?php echo brd_url('js/jquery.tipsy.js')?>"></script>
<script type="text/javascript" src="<?php echo brd_url('js/artDialog/jquery.artDialog.js')?>"></script>
<script type="text/javascript" src="<?php echo brd_url('js/artDialog/plugins/iframeTools.source.js')?>"></script>
<link rel="stylesheet" type="text/css" href="<?php echo brd_url('js/artDialog/skins/default.css?4.1.7')?>"/>
<script type="text/javascript" src="<?php echo brd_url('js/system_set.js')?>"></script>
<script type="text/javascript" src="<?php echo brd_url('js/common.js')?>"></script>
<script type="text/javascript" src="<?php echo brd_url('js/content_set.js')?>"></script>
<script type="text/javascript">
var toggle_url = '<?php echo site_aurl('content_manage/toggle_url');?>';
var ajax_add_cate = '<?php echo site_aurl('content_manage/ajax_add_cate');?>';
var ajax_edit_cate= '<?php echo site_aurl('content_manage/ajax_edit_cate');?>';
var ajax_save_cate= '<?php echo site_aurl('content_manage/ajax_save_cate');?>';
var purview_move_down = '<?php echo site_aurl('Content_manage/purview_down');?>';
var purview_move_up = '<?php echo site_aurl('Content_manage/purview_up');?>';
var myurl = '<?php echo get_url();?>';
</script>

</head>
<!--加载头部-->
<?php echo $this->common->submenu();?>
<!--加载左侧-->
<?php echo $this->common->leftmenu();?>
<div class="right">
	<div class="body"> 
	<div class="top_subnav">CMS内容管理平台 ＞ 栏目管理</div>
	  <?php echo form_open('email/send',array('class'=>'','id'=>''));?>
		<table class="table">
				<th width="10%">ID</th><th width="25%">栏目名称</th><th width="25%">所属模型</th><th width="10%">排序</th><th width="10%">导航</th><th width="20%">管理操作</th>
			</tr>
			<?php foreach($data as $val):?>
			<tr>
				<td><?php echo $val['id'];?></td>
				<td>
				<?php echo str_repeat("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;",$val['depth']).'╠'.$val['title'];?>
				</td>
                <td>
                <?php if ($val['model'] == ARTICLE): ?>
				   文章模型
				<?php elseif ($val['model'] == PRODECT): ?>
				   产品模型
				<?php elseif ($val['model'] == IMAGE): ?>
				   图片模型
				<?php elseif ($val['model'] == LEAVE): ?>
				   留言模型
				<?php elseif ($val['model'] == DOWN): ?>
				   下载模型  
				<?php endif; ?>
                </td>
                <td>
                <a href="javascript:system_set.move_up(<?php echo $val['id'];?>)"><img src="<?php echo brd_url('images/i-up.gif');?>"></img></a>
				&nbsp;&nbsp;
				<a href="javascript:system_set.move_down(<?php echo $val['id'];?>)"><img src="<?php echo brd_url('images/i-down.gif');?>"></img></a>
                </td>
			    <td id='tog_static'>
			    <a href="javascript:system_set.toggle_static(<?php echo $val['id'];?>)" 
			    title="<?php  if ($val['statics']=='0'):?>设为禁用状态
			    <?php elseif ($val['statics']=='1'):?>设为开启状态<?php endif;?>" class="tipsouth">
			    <?php echo $val['toggle_static'];?></a></td>
                
				<td><a href="javascript:system_set.edit(<?php echo $val['id'];?>)" title="编辑" class="tipright" >编辑</a>/<a _href="<?php echo site_aurl('content_manage/del_category/'.$val['id']) ;?>" title="删除" class="delSingle tipright">删除</a></td>
			</tr>
			<?php endforeach;?>
		</table>
		<table>
		<tr>
        <td>
        <input type="button" class="btn" id="btn_add" value="添加" />
        <input type="button" class="btn" id="btn_sort" value="排序"/>
        </td>
        </tr>
		
		</table>
		<?php echo form_close();?>
   </div>
</div>

<table border="0" class="add_category" id="add_category" width="412" height="200px" cellspacing="0" cellpadding="0" style="display:none;">
<tr>
<td width="170">请选择模型</td>
<td width="236">
<select class="select_160" id="model_select">
<option value="1">文章模型</option>
<option value="2">产品模型</option>
<option value="3">图片模型</option>
<option value="4">留言模型</option>
<option value="5">下载模型</option>
</select>
</td>
</tr>
<tr>
<td>上级栏目</td>
<td>
<select class="select_160" id="cate_select">
<option value='0'>独立类别</option>
<?php foreach($data as $k=>$val):?>
<option value=<?php echo $val['id']?> >
<?php echo str_repeat("&nbsp;&nbsp;",$val['depth']),'╠'.$val['title']?>
</option>
<?php endforeach;?>
</select>
</td>
</tr>
<tr><td>栏目名称</td>
<td>
<input type="text" class="input_text_200" id="cate_name"/>
</td>
</tr>
<tr><td>栏目目录</td>
<td>
<input type="text" class="input_text_200" id="cate_dir"/>
</td>
</tr>
<tr><td>导航</td>
<td>
是<input type="radio" value="0" name="navigation" checked="checked"/>
否<input type="radio" value="1" name="navigation"/>
</td>
</tr>
</table>
</html>
